bitkeeper revision 1.103.1.1 (3e5d18a7GqCcFtgB4EjULbmAXiDJzw)
authoriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Wed, 26 Feb 2003 19:42:31 +0000 (19:42 +0000)
committeriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Wed, 26 Feb 2003 19:42:31 +0000 (19:42 +0000)
xenolinux network driver tx_event now set to tx_prod rather than tx_prod+1

seems to fix a network hang problem...

xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/network/network.c

index 8e742007cf478a2938125a818643f5e2042d5503..ca33b849a08681120063726e4f2035b9a86784fa 100644 (file)
@@ -66,6 +66,17 @@ struct net_private
 };
 
  
+static void dbg_network_int(int irq, void *dev_id, struct pt_regs *ptregs)
+{
+  struct net_device *dev = (struct net_device *)dev_id;
+  struct net_private *np = dev->priv;
+  printk(KERN_ALERT "tx_full = %d, tx_entries = %d, tx_idx = %d, tx_cons = %d, tx_prod = %d, tx_event = %d, state=%d\n",
+        np->tx_full, np->tx_entries, np->tx_idx, 
+        np->net_ring->tx_cons,np->net_ring->tx_prod,np->net_ring->tx_event,
+        test_bit(__LINK_STATE_XOFF, &dev->state));
+}
+
+
 static int network_open(struct net_device *dev)
 {
     struct net_private *np = dev->priv;
@@ -123,6 +134,11 @@ static int network_open(struct net_device *dev)
         goto fail;
     }
 
+#if 1
+    request_irq( _EVENT_DEBUG, dbg_network_int, SA_SHARED, "debug", dev);    
+#endif
+
+
     printk("XenoLinux Virtual Network Driver installed as %s\n", dev->name);
 
     netif_start_queue(dev);
@@ -268,7 +284,7 @@ static int network_start_xmit(struct sk_buff *skb, struct net_device *dev)
     else
     {
         /* Avoid unnecessary tx interrupts. */
-        np->net_ring->tx_event = TX_RING_INC(np->net_ring->tx_prod);
+        np->net_ring->tx_event = np->net_ring->tx_prod;
     }
     spin_unlock_irq(&np->tx_lock);